package cn.fisok.pdman.dbreverse;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;

public class Field implements Serializable {
    @JSONField(ordinal = 10)
    private String name;
    @JSONField(ordinal = 20)
    private String type;
    @JSONField(ordinal = 30)
    private String chnname;
    @JSONField(ordinal = 40)
    private String remark="";
    @JSONField(ordinal = 50)
    private boolean pk;
    @JSONField(ordinal = 60)
    private boolean notNull;
    @JSONField(ordinal = 70)
    private boolean autoIncrement;
    @JSONField(ordinal = 80)
    private String defaultValue = "";

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getChnname() {
        return chnname;
    }

    public void setChnname(String chnname) {
        this.chnname = chnname;
    }

    public boolean isPk() {
        return pk;
    }

    public void setPk(boolean pk) {
        this.pk = pk;
    }

    public boolean isNotNull() {
        return notNull;
    }

    public void setNotNull(boolean notNull) {
        this.notNull = notNull;
    }

    public boolean isAutoIncrement() {
        return autoIncrement;
    }

    public void setAutoIncrement(boolean autoIncrement) {
        this.autoIncrement = autoIncrement;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    @Override
    public String toString() {
        return "Field{" +
                "name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", remark='" + remark + '\'' +
                ", chnname='" + chnname + '\'' +
                ", pk=" + pk +
                ", notNull=" + notNull +
                ", autoIncrement=" + autoIncrement +
                ", defaultValue='" + defaultValue + '\'' +
                '}';
    }
}
